﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DispatchAssist.BusinessLogical.Model
{
    public class ACARSDevice
    {

        /// <summary>
        /// ACARSDevice 构造函数
        /// </summary>
        public ACARSDevice()
        { }


        /// <summary>
        /// ACARSDevice OR映射构造函数
        /// </summary>
        public ACARSDevice(System.Data.IDataReader dr)
        {
            this.TailNo = Convert.ToString(dr["TailNo"]);
            this.ACARSType = Convert.ToString(dr["ACARSType"]);
            this.NeedReceipt = Convert.ToBoolean(dr["NeedReceipt"]);
            this.MaxRetryCount = Convert.ToInt32(dr["MaxRetryCount"]);
        }


        /// <summary>
        /// 飞机尾号
        /// </summary>
        public string TailNo { get; set; }

        /// <summary>
        /// 飞机子型号
        /// </summary>
        public int PlaneTypeID { get; set; }

        /// <summary>
        /// 主型号
        /// </summary>
        public int ParentID { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string CompanyCode { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public string ACARSType { get; set; }

        /// <summary>
        /// 是否需要回执
        /// </summary>
        public bool NeedReceipt { get; set; }

        /// <summary>
        /// 最大重试次数
        /// </summary>
        public int MaxRetryCount { get; set; }


        public override string ToString()
        {
            return string.Format("[飞机尾号：{0}，设备类型：{1}]", TailNo, ACARSType);
        }
    }
}
